/**
 * 
 */
package info.motteke.kurumi.swt;

import info.motteke.kurumi.VoiceInputListener;

import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;

class SendButtonListener extends SelectionAdapter {
    private final SwtVoiceInput input;

    public SendButtonListener(SwtVoiceInput swtVoiceInput) {
        input = swtVoiceInput;
    }

    @Override
    public void widgetSelected(SelectionEvent event) {
        for(VoiceInputListener listener : input.getListeners()){
            listener.onSend();
        }
    }
}